A battery produces a constant potential difference through chemical reactions. Electric current is the rate of flow of electric charge. Resistance is the ratio of voltage to current and determines how materials conduct electricity based on their resistivity and shape. Power in an electric circuit is calculated differently for direct current, which is constant, versus alternating current, which varies sinusoidally.